﻿@inherits PersonalTopicTableBase<PersonalReplyDisplayDto>
<BForm Inline="true" @ref="searchForm">
    <BFormItem TValue="string" Label="标题" Name="@nameof(SearchPersonalReplyCondition.Title)" IsRequired="false">
        <BInput IsClearable="true" TValue="string" Placeholder="输入帖子标题" Style="width:300px;"></BInput>
    </BFormItem>
    <BFormActionItem>
        <BButton Type="@ButtonType.Default" IsPlain="true" OnClick="e=>SearchData()">搜索</BButton>
    </BFormActionItem>
</BForm>
<div class="el-divider el-divider--horizontal" style="margin: 5px 0;"><!----></div>
<BTable DataSource="Datas" AutoGenerateColumns="false" Total="DataCount" @bind-CurrentPage="CurrentPage" PageSize="pageSize" @ref="table" HasSelectionColumn="false" IsStripe="true">
    <BTableColumns>
        <BTableColumn Width="500" Property="@nameof(PersonalReplyDisplayDto.Title)" Text="标题">
            <span style="float:left;" @onclick="e=>LinktoTopic(context)">@(((PersonalReplyDisplayDto)context).Title)</span>
        </BTableColumn>
        <BTableColumn Width="100" Property="@nameof(PersonalReplyDisplayDto.Author)" Text="发帖人"></BTableColumn>
        <BTableColumn Width="100" Format="yyyy-MM-dd" Property="@nameof(PersonalReplyDisplayDto.CreateDate)" Text="回复时间"></BTableColumn>
        <BTableColumn Width="100" Property="@nameof(PersonalReplyDisplayDto.Content)" Text="回复内容">
            <BButton Type="@ButtonType.Text" OnClick="e=>ShowContent(context)">查看</BButton>
        </BTableColumn>
        <BTableTemplateColumn Text="操作" Width="100">
            <BButton Type="@ButtonType.Danger" Size="@ButtonSize.Mini" Style="border-color:transparent !important" IsPlain="true" IsCircle="true" Icon="el-icon-remove-outline" OnClick="@(e=> Del(context))">
            </BButton>
            <BButton Type="@ButtonType.Success" Size="@ButtonSize.Mini" Style="border-color:transparent !important" IsPlain="true" IsCircle="true" Icon="el-icon-link" OnClick="@(e=> LinktoTopic(context))">
            </BButton>
        </BTableTemplateColumn>
    </BTableColumns>
</BTable>